/***
 * * PROJECT
 * *    Logical Neighborhood Routing
 * * VERSION
 * *    $Revision: 1.1 $
 * * DATE
 * *    $Date: 2006/12/14 05:15:16 $
 * * LOG
 * *    $Log: SimulationReferences.java,v $
 * *    Revision 1.1  2006/12/14 05:15:16  lmottola
 * *    Moved Estimator in atag.compiler and various cleanup.
 * *
 * *    Revision 1.3  2006/10/26 23:58:50  lmottola
 * *    HelloWorld running in SWANS.
 * *
 * *    Revision 1.2  2006/10/26 01:05:47  lmottola
 * *    Added references for ATaG manager and moved in testing.
 * *
 * *    Revision 1.1  2006/10/26 00:24:53  lmottola
 * *    SimulationReferences added.
 * *
 * *    Revision 1.2  2006/10/25 22:50:27  lmottola
 * *    SSD routing debugged,
 * *
 * *    Revision 1.1  2006/10/20 23:53:41  lmottola
 * *    Initial LN code in.
 * *
 * *
 * *   Logical Neighborhoods Routing - Java Version
 * *                                
 * *
 * *   This program is free software; you can redistribute it and/or
 * *   modify it under the terms of the GNU General Public License
 * *   as published by the Free Software Foundation; either version 2
 * *   of the License, or (at your option) any later version.
 * *
 * *   This program is distributed in the hope that it will be useful,
 * *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 * *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * *   GNU General Public License for more details.
 * *
 * *   You should have received a copy of the GNU General Public License
 * *   along with this program; if not, you may find a copy at the FSF web
 * *   site at 'www.gnu.org' or 'www.fsf.org', or you may write to the
 * *   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * *   Boston, MA  02111-1307, USA
 ***/

package atag.runtime.ln.swans;

import java.util.HashMap;

import atag.runtime.AtagManager;
import atag.runtime.NodeInfo;
import atag.runtime.ln.DatagramObjectIO;
import atag.runtime.ln.LogicalNeighborhood;

public class SimulationReferences {

	public static HashMap nodeInfos = new HashMap();

	public static HashMap lns = new HashMap();

	public static HashMap objectIOs = new HashMap();;

	public static HashMap atagManagers = new HashMap();;

	public static void setLN(int id, LogicalNeighborhood ln) {
		lns.put(new Integer(id), ln);
	}

	public static LogicalNeighborhood getLN(int id) {
		return (LogicalNeighborhood) lns.get(new Integer(id));
	}

	public static void setNodeInfo(int id, NodeInfo info) {
		nodeInfos.put(new Integer(id), info);
	}

	public static NodeInfo getNodeInfo(int id) {
		return (NodeInfo) nodeInfos.get(new Integer(id));
	}

	public static void setObjectIO(int id, DatagramObjectIO objectIO) {
		objectIOs.put(new Integer(id), objectIO);
	}

	public static DatagramObjectIO getObjectIO(int id) {
		return (DatagramObjectIO) objectIOs.get(new Integer(id));
	}

	public static void setAtagManager(int id, AtagManager atagManager) {
		atagManagers.put(new Integer(id), atagManager);
	}
	
	public static AtagManager getAtagManager(int id) {
		return (AtagManager) atagManagers.get(new Integer(id));
	}
}
